<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>你好React</title>
    <!-- 1. 引入react核心库 -->
    <script src="./node_modules/react/umd/react.development.js"></script>
    <!-- 2. 引入react-dom 用于支持react操作dom -->
    <script src="./node_modules/react-dom/umd/react-dom.development.js"></script>
    <div id="box"></div>
<script>
       console.log('React', React, ReactDOM)

       let title = React.createElement('h2', null, '你好React')
    // 4. 渲染元素到页面中
    // 17版本用法
    ReactDom.render(title,document.getElementById('box'))
</script>
</body>
</html>